package com.kaifamiao.demo.d0827;

public class Test {


}
class Base{
    private String name = "base";
    public Base(){
        tellName();
        pritName();
    }
    public void tellName(){
        System.out.println("Base tell name:" + name);
    }

    public void pritName(){
        System.out.println("Base print name: " + name);
    }
}

class Dervied extends Base {

    private String name = "Dervied";
    public Dervied(){
        tellName();
        pritName();
    }
    public void tellName(){
        System.out.println("Dervied tell name:" + name);
    }

    public void pritName(){
        System.out.println("Dervied print name: " + name);
    }

    public static void main(String[] args) {
        new Dervied();
    }
}
